/*
 * ScrollableContainer.hpp
 *
 *  Created on: 03-12-2010
 *      Author: Piotr
 */

#pragma once

#include "Container.hpp"
#include "ScrollBar.hpp"
#include "pch.hpp"

class ScrollableContainer: public Container
{
	private:
		ScrollBar* verticalScrollBar;
		ScrollBar* horizontalScrollBar;
		boost::shared_ptr<Control> control;

	public:
		ScrollableContainer(Control* control);

		void fillAreaOutOfControlBounds(int horizontalShift, int verticalShift);
		virtual void draw(const ClipArea& clipArea);
		Control* getDeepestControlAt(const Vector& point, Vector* controlCoordinates);

	private:
		void setScrollBarsPlacements();
		Vector getViewAreaPosition() const;
};
